package com.panda.web.mapper.py;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.panda.web.domain.vo.commons.CompanyJobVO;
import com.panda.web.entity.py.Company;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 公司Mapper接口
 * 
 * @author cpanda
 * @date 2025-03-03
 */
@Mapper
public interface CompanyMapper extends BaseMapper<Company> {

    @Select("select  * from company where company_id =#{companyId} ")
    List<Company> findByCompanyId(String companyId);

    @Select("select id,company_id, name,area_cn,industry_cn,nature_cn from company where company_id =#{companyId} ")
    List<Company> findByCompanyIdById(String companyId);

    @Select("select company_id, name,area_cn,industry_cn,nature_cn from company where company_id =#{companyId} ")
    Company findByCompany(String companyId);

    @Select({
            "<script>",
            "select id, company_id, name, area_cn, industry_cn, nature_cn from company",
            "where company_id in",
            "<foreach collection='ids' item='id' open='(' separator=',' close=')'>",
            "#{id}",
            "</foreach>",
            "</script>"
    })
    List<Company> findByCompanyIds(@Param("ids") List<String> companyIds);
}
